import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
const path = require('path')

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  build: {
    lib: {
      entry: path.resolve(__dirname, './index.js'),
      name: 'vue3-json-excel',
      formats: ['es', 'umd', 'cjs'],
      fileName: (format) => `vue3-json-excel.${format}.js`
    }
  }
})
